package com.laboratory.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 * 枚举类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(202, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    USERNAME_NOT_FOUND(500, "用户名不存在"),
    PASSWORD_ERROR(500, "密码错误"),
    PARAM_ERROR(500, "参数错误"),
    TOKEN_ERROR(500, "token错误");


    private Integer code;       //返回码（状态码）

    private String message;     //返回消息

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
